<?php
include_once "xAP-functions/webincludes.php";
echo webpageheader();



$now=date("Y-m-d H:i:s");


$sql="select TriggerID,ProgName,ProgDesc,Delay 
from xAP_TV_Trigger 
";
$results=dbquery($sql);

//display
echo "<table width=100%>
<TR><TD class='boldtext'>Title</td><TD class='boldtext'>Description</td><TD class='boldtext'>Delay</td><td></td></tr>";
foreach($results as $row){
	echo "<tr>
	<TD class='normaltext'>".$row["ProgName"]."</td>
	<TD class='normaltext'>".$row["ProgDesc"]."</td>
	<TD class='normaltext'>".$row["Delay"]."</td>
	<TD class='normaltext'><a href='config_trigger_update.php?id=".$row["TriggerID"]."'>Edit</a>
	</td>
	</tr>";
}


echo "
<tr><td colspan=4 class='normaltext'><a href='config_trigger_update.php?id=0'>Add new</a></td></tr>
</table>";

echo webpagefooter();
?>